<?php
namespace App\Event\Order;

use App\Event\Event;
use App\Repository\UserRepository;
use App\Repository\LevelRepository;

// 订单确认事件
class StatusOkEvent extends Event
{
    public $order;
    
    // 用户及金额
    public function __construct($order)
    {
        $this->order = $order;
        
        // 等级
        $this->level = LevelRepository::make($this->order->level);
        
        // 用户
        $this->user = UserRepository::make($this->order->user);
    }
}